package com.zyx.javademo.enumdemo;

/**
 * @author Yaxi.Zhang
 * @since 2021/6/29 11:30
 * desc: NumberedWeekday枚举类案例
 */
public class NumberedWeekdayDemo {
    public static void main(String[] args) {
        NumberedWeekday day = NumberedWeekday.SUN;
        if (day.dayValue == 6 || day.dayValue == 0) {
            // 输出的为 枚举类 中重写的toString 方法
            System.out.println("Today is " + day + ". Work at home!");
        } else {
            System.out.println("Today is " + day + ". Work at office!");
        }
    }
}
